package com.wyp.design.pattern.structural.decorator.v2;

/**
 * 具体的装饰者  符合开闭原则，
 *
 * @author: Oliver
 * @time: 2020/5/13/16:18
 */
public class BatterCakeWithEggDecorator extends ABatterCakeDecorator {
    public BatterCakeWithEggDecorator(ABatterCake batterCake) {
        super(batterCake);
    }

    @Override
    public String getDesc() {
        return super.getDesc() + "加一个鸡蛋";
    }

    @Override
    public int cost() {
        return super.cost() + 1;
    }
}
